package cn.tedu.boot.ers.exception;

import cn.tedu.boot.ers.web.State;
import lombok.Data;

@Data
public class ServiceException extends RuntimeException {

    private State state;

    public ServiceException(State state, String message) {
        super(message);
        if (state == null) {
            throw new IllegalArgumentException("必须添加state");
        }
        this.state = state;
    }
}
